import instance from "@/services/axios";


/**
 * 查询列表
 * @param {*} param 
 */
async function getUsageRecord(host, param = { pageIndex, pageSize,startTime,endTime }) {
    const { message, msg , totality } = await instance.post(`${host}/getUsageRecord`, param);
    return { message , msg , totality };
}


/**
 * 查询列表
 * @param {*} param 
 */
async function exportAllRecords(host) {
    const { message, msg } = await instance.post(`${host}/exportAllRecords`);
    return { message , msg };
}





/**
 * 删除记录
 * @param {*} param 
 */
async function deleteRecords(host, param = { UsageRecordId }) {
    const { message, msg  } = await instance.post(`${host}/deleteRecords`, param);
    return { message , msg};
}







export default {
    getUsageRecord,
    deleteRecords,
    exportAllRecords,
};